﻿using System;

namespace UniSender
{
    public class CampaignInfo
    {
        public virtual int Id { get; set; }
        public virtual DateTime? CreationTime { get; set; }
        public virtual DateTime StartTime { get; set; }
        public virtual CampaingStatus Status { get; set; }

        public CampaignInfo()
        { }

        public CampaignInfo(Native.CampaignInfo native)
        {
            Id = native.id;
            if (native.creation_time != null)
                CreationTime = Utility.ParseTime(native.creation_time);
            StartTime = Utility.ParseTime(native.start_time);
            Status = Utility.ParseEnum<CampaingStatus>(native.status);
        }
    }
}
